package vip.xiaonuo.index.controller;

import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import vip.xiaonuo.core.pojo.response.ResponseData;
import vip.xiaonuo.core.pojo.response.SuccessResponseData;
import vip.xiaonuo.index.vo.CommunityIndexVo;
import vip.xiaonuo.index.service.CommunityIndexService;

import javax.annotation.Resource;


@RestController
public class FrontIndexController {

    @Resource
    private CommunityIndexService communityIndexService;

    @ApiOperation(value = "首页统计接口-社区", tags = "首页统计接口-社区", response = CommunityIndexVo.class)
    @GetMapping("/index/community")
    public ResponseData communityStatistics() {

        return new SuccessResponseData(communityIndexService.index());
    }



}
